/* Copyright 2007-2008 dnAnalytics Project.
 *
 * Contributors to this file:
 * Patrick van der Velde
 *
 * This file is part of dnAnalytics.  dnAnalytics is licensed under the 
 * Microsoft Public License. See License.txt for a complete copy of the
 * license.
 */

namespace dnAnalytics.LinearAlgebra.Solvers
{
    /// <summary>
    /// Defines the interface for <c>ISolver</c> classes that solve the matrix equation Ax = b in
    /// an iterative manner.
    /// </summary>
    public interface IIterativeSolver : ISolver
    {
        /// <summary>
        /// Stops the solve process. 
        /// </summary>
        /// <remarks>
        /// Note that it may take an indetermined amount of time for the solver to actually
        /// stop the process.
        /// </remarks>
        void StopSolve();

        /// <summary>
        /// Sets the <c>IIterator</c> that will be used to track the iterative process.
        /// </summary>
        /// <param name="iterator">The iterator.</param>
        void SetIterator(IIterator iterator);

        /// <summary>
        /// Gets the status of the iteration once the calculation is finished.
        /// </summary>
        ICalculationStatus IterationResult { get; }
    }
}
